package com.aspose.cells;

class zmh extends zbz {
   zmh() {
      this.c(2169);
   }

   void a(FormatConditionCollection var1, int var2, int var3) {
      int var4 = var1.getRangeCount();
      this.a((short)(26 + var4 * 8));
      this.c = new byte[this.d()];
      this.c[0] = 121;
      this.c[1] = 8;
      this.c[2] = 1;
      byte var5 = 12;
      System.arraycopy(com.aspose.cells.b.a.zc.a((short)var2), 0, this.c, var5, 2);
      int var13 = var5 + 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a((short)(var3 << 1 | (var1.c ? 1 : 0))), 0, this.c, var13, 2);
      var13 += 10;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, this.c, var13, 2);
      var13 += 2;
      int var6 = 65535;
      int var7 = 255;
      int var8 = 0;
      int var9 = 0;
      byte[] var10 = this.c;

      for(int var11 = 0; var11 < var4; ++var11) {
         CellArea var12 = (CellArea)var1.b.get(var11);
         if (var12.StartRow < var6) {
            var6 = var12.StartRow;
         }

         if (var12.StartColumn < var7) {
            var7 = var12.StartColumn;
         }

         if (var12.EndRow > var8) {
            var8 = var12.EndRow;
         }

         if (var12.EndColumn > var9) {
            var9 = var12.EndColumn;
         }

         var13 += a(var10, var13, var12);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var6), 0, this.c, 4, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var8), 0, this.c, 6, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, this.c, 8, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, this.c, 10, 2);
      System.arraycopy(this.c, 4, this.c, 16, 8);
   }

   static int a(byte[] var0, int var1, CellArea var2) {
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.StartRow), 0, var0, var1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.EndRow), 0, var0, var1 + 2, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.StartColumn), 0, var0, var1 + 4, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.EndColumn), 0, var0, var1 + 6, 2);
      return 8;
   }
}
